/*
 * @Author: didididijiajiajia 11643763+didididijiajiajia@user.noreply.gitee.com
 * @Date: 2024-04-03 17:52:05
 * @LastEditors: didididijiajiajia 11643763+didididijiajiajia@user.noreply.gitee.com
 * @LastEditTime: 2024-04-05 14:56:15
 * @FilePath: \react全栈\vue_ts-server\router\article.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const express = require('express');
// 创建路由对象
const router = express.Router();

// 导入用户路由处理函数模块
const articleHandler = require('../router_handler/article');

//添加文章
router.post('/add', articleHandler.addArticle)
//修改文章
router.post('/update/:id', articleHandler.updateArticle)
//删除文章
router.post('/delete/:id', articleHandler.deleteArticle)
//查询所有文章
router.get('/all', articleHandler.getAllArticle)
//文章详情
router.get('/detail/:id', articleHandler.getArticleById)




module.exports = router;
